package lib.quasar.db.gen;

import java.util.Map;

import org.greenrobot.greendao.AbstractDao;
import org.greenrobot.greendao.AbstractDaoSession;
import org.greenrobot.greendao.database.Database;
import org.greenrobot.greendao.identityscope.IdentityScopeType;
import org.greenrobot.greendao.internal.DaoConfig;

import lib.quasar.db.table.Message;
import lib.quasar.db.table.Diagnoseinfo;
import lib.quasar.db.table.Pedometer;
import lib.quasar.db.table.User;
import lib.quasar.db.table.Http;
import lib.quasar.db.table.Aerainfo;
import lib.quasar.db.table.Hospital;
import lib.quasar.db.table.Medicine;
import lib.quasar.db.table.Chat;
import lib.quasar.db.table.Conf;

import lib.quasar.db.gen.MessageDao;
import lib.quasar.db.gen.DiagnoseinfoDao;
import lib.quasar.db.gen.PedometerDao;
import lib.quasar.db.gen.UserDao;
import lib.quasar.db.gen.HttpDao;
import lib.quasar.db.gen.AerainfoDao;
import lib.quasar.db.gen.HospitalDao;
import lib.quasar.db.gen.MedicineDao;
import lib.quasar.db.gen.ChatDao;
import lib.quasar.db.gen.ConfDao;

// THIS CODE IS GENERATED BY greenDAO, DO NOT EDIT.

/**
 * {@inheritDoc}
 * 
 * @see org.greenrobot.greendao.AbstractDaoSession
 */
public class DaoSession extends AbstractDaoSession {

    private final DaoConfig messageDaoConfig;
    private final DaoConfig diagnoseinfoDaoConfig;
    private final DaoConfig pedometerDaoConfig;
    private final DaoConfig userDaoConfig;
    private final DaoConfig httpDaoConfig;
    private final DaoConfig aerainfoDaoConfig;
    private final DaoConfig hospitalDaoConfig;
    private final DaoConfig medicineDaoConfig;
    private final DaoConfig chatDaoConfig;
    private final DaoConfig confDaoConfig;

    private final MessageDao messageDao;
    private final DiagnoseinfoDao diagnoseinfoDao;
    private final PedometerDao pedometerDao;
    private final UserDao userDao;
    private final HttpDao httpDao;
    private final AerainfoDao aerainfoDao;
    private final HospitalDao hospitalDao;
    private final MedicineDao medicineDao;
    private final ChatDao chatDao;
    private final ConfDao confDao;

    public DaoSession(Database db, IdentityScopeType type, Map<Class<? extends AbstractDao<?, ?>>, DaoConfig>
            daoConfigMap) {
        super(db);

        messageDaoConfig = daoConfigMap.get(MessageDao.class).clone();
        messageDaoConfig.initIdentityScope(type);

        diagnoseinfoDaoConfig = daoConfigMap.get(DiagnoseinfoDao.class).clone();
        diagnoseinfoDaoConfig.initIdentityScope(type);

        pedometerDaoConfig = daoConfigMap.get(PedometerDao.class).clone();
        pedometerDaoConfig.initIdentityScope(type);

        userDaoConfig = daoConfigMap.get(UserDao.class).clone();
        userDaoConfig.initIdentityScope(type);

        httpDaoConfig = daoConfigMap.get(HttpDao.class).clone();
        httpDaoConfig.initIdentityScope(type);

        aerainfoDaoConfig = daoConfigMap.get(AerainfoDao.class).clone();
        aerainfoDaoConfig.initIdentityScope(type);

        hospitalDaoConfig = daoConfigMap.get(HospitalDao.class).clone();
        hospitalDaoConfig.initIdentityScope(type);

        medicineDaoConfig = daoConfigMap.get(MedicineDao.class).clone();
        medicineDaoConfig.initIdentityScope(type);

        chatDaoConfig = daoConfigMap.get(ChatDao.class).clone();
        chatDaoConfig.initIdentityScope(type);

        confDaoConfig = daoConfigMap.get(ConfDao.class).clone();
        confDaoConfig.initIdentityScope(type);

        messageDao = new MessageDao(messageDaoConfig, this);
        diagnoseinfoDao = new DiagnoseinfoDao(diagnoseinfoDaoConfig, this);
        pedometerDao = new PedometerDao(pedometerDaoConfig, this);
        userDao = new UserDao(userDaoConfig, this);
        httpDao = new HttpDao(httpDaoConfig, this);
        aerainfoDao = new AerainfoDao(aerainfoDaoConfig, this);
        hospitalDao = new HospitalDao(hospitalDaoConfig, this);
        medicineDao = new MedicineDao(medicineDaoConfig, this);
        chatDao = new ChatDao(chatDaoConfig, this);
        confDao = new ConfDao(confDaoConfig, this);

        registerDao(Message.class, messageDao);
        registerDao(Diagnoseinfo.class, diagnoseinfoDao);
        registerDao(Pedometer.class, pedometerDao);
        registerDao(User.class, userDao);
        registerDao(Http.class, httpDao);
        registerDao(Aerainfo.class, aerainfoDao);
        registerDao(Hospital.class, hospitalDao);
        registerDao(Medicine.class, medicineDao);
        registerDao(Chat.class, chatDao);
        registerDao(Conf.class, confDao);
    }
    
    public void clear() {
        messageDaoConfig.clearIdentityScope();
        diagnoseinfoDaoConfig.clearIdentityScope();
        pedometerDaoConfig.clearIdentityScope();
        userDaoConfig.clearIdentityScope();
        httpDaoConfig.clearIdentityScope();
        aerainfoDaoConfig.clearIdentityScope();
        hospitalDaoConfig.clearIdentityScope();
        medicineDaoConfig.clearIdentityScope();
        chatDaoConfig.clearIdentityScope();
        confDaoConfig.clearIdentityScope();
    }

    public MessageDao getMessageDao() {
        return messageDao;
    }

    public DiagnoseinfoDao getDiagnoseinfoDao() {
        return diagnoseinfoDao;
    }

    public PedometerDao getPedometerDao() {
        return pedometerDao;
    }

    public UserDao getUserDao() {
        return userDao;
    }

    public HttpDao getHttpDao() {
        return httpDao;
    }

    public AerainfoDao getAerainfoDao() {
        return aerainfoDao;
    }

    public HospitalDao getHospitalDao() {
        return hospitalDao;
    }

    public MedicineDao getMedicineDao() {
        return medicineDao;
    }

    public ChatDao getChatDao() {
        return chatDao;
    }

    public ConfDao getConfDao() {
        return confDao;
    }

}
